package com.zz.Enum;

public enum B {//抽象枚举
    X(){
        public void go(){
        }
    },
    Y("张三"){
        public void go(){
            System.out.println(getName() + "很快乐");
        }
    };
    public abstract void go();
    private String name;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    B(){
    }

    B(String name){
        this.name = name;
    }
}
